package service

import (
	"context"
	"devops-super/api"
	v1 "devops-super/api/clusters/v1"
	"devops-super/internal/model/entity"
	"devops-super/internal/model/mymodel"
)

type IDeptServer interface {
	GetPageLst(ctx context.Context, in *v1.DeptServerPageLstReq) (out *api.PageLstRes[*mymodel.DeptServerResponse], err error)
	Add(ctx context.Context, in *entity.AppDeptToServerRecord) (err error)
	Del(ctx context.Context, req *v1.DeptServerDelReq) (err error)
}

var (
	localDeptServer IDeptServer
)

func DeptServer() IDeptServer {
	if localDeptServer == nil {
		panic("implement not found for interface IDeptServer, forgot register?")
	}
	return localDeptServer
}

func RegisterDeptServer(i IDeptServer) {
	localDeptServer = i
}
